package day02;
//类型转换
public class TypeConv {
    public static void main(String[] args) {
/*
        long g = 2124435677688l;
        int p= (int)g;//强制转换要加括号
        System.out.println(p);//大转小有可能发生溢出
        double y = 756.97;
        int i = (int)y;
        System.out.println(i);//也有可能发生精度丢失
        long d = 67;
        double o = 87;//自动转换
        double oo = 8798765433456798765l;
        int uu = (int)oo;
        System.out.println(uu);
        你愿意做我女朋友么
 */


        System.out.println('2'+'2');//运算就会变为对应码
        System.out.println(2+2);
        System.out.println('2');//因为没有运算所以输出字符2
        System.out.println(2+'2');
        int a='a';
        System.out.println(a);//查看字符对应码
        char b =97;
        System.out.println(b);//查看码对应的字符


    }
}
